/*
 * Powered By [Frank-Liz-Lee]
 * Copyright(C) 2012-2016 Liz Company
 * All rights reserved.
 */

package com.linln.modules.system.service;

import com.linln.common.enums.StatusEnum;
import com.linln.modules.system.domain.Dept;
import com.github.pagehelper.PageInfo;



import java.util.List;

public interface DeptService extends GenericIService<Dept,Long>{

    /**
     * 通过主键查询实体对象
     *
     * @param primaryKey
     * @return
     * @throws Exception
     */
    public Dept getByPK(Long primaryKey) ;

    /**
     * 查询所有记录
     * @return
     * @throws Exception
     */
    public List<Dept> list() ;

    /**
     * 根据查询条件查询所有记录
     * @return
     * @throws Exception
     */
    public List<Dept> listByProperty(Dept dept) ;


    /**
     * 根据主键删除记录
     * @param primaryKey
     * @return
     * @throws Exception
     */
    public int deleteByPK(Long primaryKey) ;

    /**
     * 根据多个主键删除记录
     * @param primaryKeys
     * @throws Exception
     */
    public int deleteByPKeys(List<Long> primaryKeys) ;

    /**
     * 根据传入参数删除记录
     * @param dept
     * @return
     * @throws Exception
     */
    public int deleteByProperty(Dept dept) ;

    /**
     * 保存记录
     * @param dept
     * @return
     * @throws Exception
     */
    public int save(Dept dept) ;

    /**
     * 更新记录
     * @param dept
     * @return
     * @throws Exception
     */
    public int update(Dept dept) ;

    /**
     * 根据条件查询记录条数
     * @param dept
     * @return
     * @throws Exception
     */
    public int findByCount(Dept dept) ;

    /**
     * 根据查询条件查询分页记录
     * @return
     * @throws Exception
     */
    public PageInfo<Dept> findByPage(Integer pageNum, Integer pageSize, Dept dept);

    Integer getSortMax(Long pid);

    boolean updateStatus(StatusEnum statusEnum, List<Long> ids);

    List<Dept> getListByPid(Long pid);

}
